package main

import (
	"database/sql"
	"fmt"
	_ "github.com/go-sql-driver/mysql"
	"github.com/jakilwq/common-tools"
	"time"
)

func main() {
	db, err := sql.Open("mysql", "user:password@tcp(localhost)/dbname")
	if err != nil {
		panic(err)
	}

	db.SetConnMaxLifetime(time.Minute * 5)
	db.SetMaxOpenConns(10)
	db.SetMaxIdleConns(10)

	fmt.Println(common_tools.GetHostName())
}
